package com.fengxing.ams.web.facade.mouble.company;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

public interface IEnterpriseNotifyDAO extends PagingAndSortingRepository<EnterpriseNotifyVO, Integer>, JpaSpecificationExecutor<EnterpriseNotifyVO>  {

	@Query(value="select * from zyt_enterprise_notify where statue='未处理'", nativeQuery=true)
	List<EnterpriseNotifyVO> findAllIds();

	@Modifying
	@Query(value="update zyt_enterprise_notify statue='已处理' where id =:id", nativeQuery=true)
	void updateStatus(@Param("id")Integer id);
}

